home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 1996 November / macformat-043.iso / mac / Shareware Plus / Developers / OpenStack Rinaldi Collection / openstack-rinaldi-lib / Chartoid 1.4 (US) / Chartoid 1.4 (US).rsrc / HELP_5635 next >
Encoding:
Text File  |  1996-01-09  |  9.4 KB  |  192 lines

  1.  
  2.  
  3.                                              Chartoid 1.4
  4.  
  5.                                            by Frédéric RINALDI
  6.  
  7.  
  8. DESCRIPTION
  9.   Chartoid XCMD allows to create colorful charts in an external window. It requires Color QuickDraw to work.
  10.  
  11. SYNTAX
  12.     Chartoid <window name>,<datas>[,«chart type»][,«window style»]
  13.                   [,«X,Y[,Z,T]»][,«font name»][,«font size»]
  14.  
  15. PARAMETERS
  16.    «» enclosed params are order-independent.
  17.  
  18.    <window name> is the name of the window.
  19.  
  20.    <datas> is an array of datas to be displayed as chart.
  21.  
  22.    «chart type» is the chart type. It may be bar, column, pie, line, scatter or area. Default is column.
  23.  
  24.    «window style» is a string defining the window style. Allowed styles are : plain, zoom, roundRect, rect, shadow, windoid, windoidZoom, bigWindoid, bigWindoidZoom, Rinaldoid, RinaldoidZoom (Rinaldoid is the same as windoid, except that it displays the window title). All window styles are floating, except plain, zoom and roundRect. A windoid or Rinaldoid style window will have small scrollbars, while other styles will use standard size. Default is RinaldoidZoom if Rinaldoid WDEF resource is present, windoidZoom if not found.
  25.  
  26.    «X,Y[,Z,T]» will be a point or a rect, and will define position and/or size of the windoid. Coordinates are card-relative. If omitted, windoid will appear with standard size at "0,10".
  27.  
  28.    «font name» is a string giving the font to use. Default is Geneva.
  29.  
  30.    «font size» is a string giving the font size to use. Default is 10.
  31.  
  32.    Using "!", "?" and "=" as first parameter will return an online help (resp. copyright,  syntax and output).
  33.  
  34. USING
  35.    Chartoid is stand alone, no linked resource is needed. Meanwhile, this stack contains a WDEF resource that are recognized by the XCMD if present. The WDEF allows to have an enhanced, System 7 like windoid with title. So, this resource is optional, and for aesthetic purpose only. If you copy it, its ID can be set to any value but don't change its name. 
  36.  
  37. Hint: 
  38.   If you use a rect or shadow style window, placing it on a card can simulate a smart color graphic HyperCard field. In order to keep it at the same loc when the card window is moved, use the following script in stack:
  39.  
  40.      on MoveWindow
  41.        set loc of window "My Chart" to "50,50"
  42.      end MoveWindow
  43.  
  44.    With multiple screens configuration, the windoid will be zoomed on the screen where its largest part lays on.
  45.  
  46. Shortcut: 
  47.    Control-Click in content allows to move the window (useful for rect or shadow type windows, since having no title bar).
  48.  
  49. MESSAGES
  50.    OpenChartoid : sent when a windoid is opened, followed by the windoid name and ID. This allows to define window properties before it is shown, since the message can be trapped using a handler :
  51.  
  52.      on OpenChartoid WName,WId
  53.        if WName is "MyWindow" then...
  54.      end OpenChartoid
  55.  
  56.    CloseChartoid : sent when a windoid is closed, followed by the windoid name and ID. This allows to get window properties before it is closed, since the message can be trapped using a handler :
  57.  
  58.      on CloseChartoid WName,WId
  59.        if WName is "MyWindow" then...
  60.      end CloseChartoid
  61.  
  62.    ClickInChartoid : sent when the user clicks on a value in the window, followed by the windoid name, ID, serie name, value name, serie #, value # and serie sum (except for pie, where last param is the value itself). The message can be trapped using a handler :
  63.  
  64.     on ClickInChartoid WName,WId,sName,vName,sNb,vNv,val
  65.       if WName is "MyWindow" then...
  66.     end ClickInChartoid
  67.  
  68. COMMANDS
  69.    Chartoid supports 5 commands that will be called using : 
  70.  
  71.                        send <command> to window <name>
  72.  
  73.  print         : displays the two print dialogs and prints the chart
  74.  printNoDialog : prints the chart using last setup.
  75.  copy          : copies the chart to the clipboard.
  76.  save          : brings a save dialog, and saves the chart as PICT file.
  77.                 On return, the result contains the full path of saved 
  78.                 file.
  79.  saveNoDialog  : saves the chart as PICT file using window name, in
  80.                 the folder of current stack. On return, the result
  81.                 contains the full path of saved file.
  82.  
  83. PROPERTIES
  84.    Like any XWindow, Chartoid has properties that can be get and set thru HyperTalk.
  85.                           properties of window <name>
  86.  
  87.    will return an item list of all allowed properties (default values are shown underlined) :
  88.  
  89.    backColor       : color of bkgnd (red, magenta, cyan, yellow, 
  90.                      blue, green, black, white or a 3 integer items
  91.                      string giving the "red,green,blue" values)
  92.    backPattern     : pattern of bkgnd (1-32)
  93.    backPixPat      : pixPat of bkgnd (ppat resource name or id).
  94.                      set to empty to dismiss it.
  95.    commands        : list of supported commands
  96.    chartType       : type of chart (column, pie, line, scatter, area,
  97.                      bar)
  98.    framedLegend    : boolean to set legend frame (true, false)
  99.    growAllowed     : boolean to allow size change (true, false)
  100.    id              : windoid's id (get only)
  101.    interval        : percentage integer defining space between 
  102.                      columns (column chart only) (0-100)
  103.    legendLoc       : legend's position (left, right, top, bottom)
  104.    loc             : windoid's position according to card ("0,10")
  105.    messages        : list of messages sent by the windoid
  106.    movedPart       : pie's part number to move. 0 moves the largest.
  107.                      Default is -1 (no moved part).
  108.    serie<N>        : switch two series datas (set only)
  109.                      (ex: set serie1 to 2)
  110.    serieColor<N>   : color of serie N (red, magenta, cyan, yellow, 
  111.                      blue, green, black, white or a 3 integer items
  112.                      string giving the "red,green,blue" values)
  113.    serieLine<N>    : line size of serie N
  114.    serieName<N>    : name of serie N
  115.    seriePattern<N> : pattern of serie N (1-32)
  116.    seriePict<N>    : picture of serie N (PICT resource name or id)
  117.    seriePixPat<N>  : pixPat of serie N (ppat resource name or id)
  118.                      set to empty to dismiss it.
  119.    serieShape<N>   : shape of serie N (rect,circle,diamond,triangle,
  120.                      none) (line & scatter chart only)
  121.    seriesNb        : number of series (get only)
  122.    serieValues<N>  : values of serie N
  123.    showLegend      : visibility of legend (true, false)
  124.    showLines       : visibility of series lines (true, false)
  125.    showValues      : visibility of series values (true, false)
  126.    showXGuides     : visibility of vertical guides (true, false)
  127.    showXMarks      : visibility of vertical marks (true, false)
  128.    showYGuides     : visibility of horizontal guides (true, false)
  129.    showYMarks      : visibility of vertical marks (true, false)
  130.    stacked         : stacking of values (true, false)
  131.    superpose       : percentage integer defining superposition of
  132.                      columns (column chart only) (0-100)
  133.    textFont        : font used for text drawing (Geneva, Times...)
  134.    textSize        : font size used for text drawing (10)
  135.    threeDVal       : 3D integer value (0)
  136.    valueColor<N>   : color of value N (pie only) (red, magenta, cyan, 
  137.                      yellow, blue, green, black, white or a 3 integer
  138.                      items string giving the "red,green,blue" values)
  139.    valueName<N>    : name of value N (pie only)
  140.    valuePattern<N> : pattern of value N (pie only) (1-32)
  141.    valuePixPat<N>  : pixPat of serie N (ppat resource name or id)
  142.                      set to empty to dismiss it.
  143.    visible         : visibility of windoid (true, false)
  144.    XTitle          : X axis' title (empty)
  145.    YTitle          : Y axis' title (empty)
  146.  
  147. ERRORS
  148. If an error occurs, Chartoid can return :
  149.      "Error : Chartoid required Color QuickDraw"
  150.      "Error : empty parameter #X"
  151.      "Error : Window rect defined twice"
  152.      "Error : Window loc defined twice"
  153.      "Error : Font size defined twice"
  154.      "Error : Chart type defined twice"
  155.      "Error : Font name defined twice"
  156.      "Error : Unrecognized parameter #X"
  157.      "Error : Scatter chart requires almost 2 values series"
  158.      "Error : Missing window name"
  159.      "Error : Missing chart datas"
  160.      "Error : Duplicate window name"
  161.      "Error : Out of memory"
  162.      "Error : Printing aborted"
  163.      "Error : Printing error"
  164.  
  165. HISTORY
  166. 1.4                                                                  05/01/94
  167. • Added saved path result to "save" command
  168.  
  169. 1.3.1                                                               04/09/94
  170. • Simple recompile
  171.  
  172. 1.3                                                                  03/22/94
  173. • Fixed Y axis values display
  174.  
  175. 1.2                                                                  02/26/94
  176. • Fixed Y axis location for small values
  177. • Fixed window loc when card is hidden
  178.  
  179. 1.1                                                                  08/11/93
  180. • Fixed values names major bug with pie charts
  181.  
  182. 1.0                                                                  07/24/93
  183. • First public release
  184. --------------------------------------------------------------------
  185.    All externals included in this stack are FreeWare and may be used in non-commercial software provided the following notice is visibly present :
  186.  
  187.                           Chartoid XCMD © Frederic Rinaldi, 1994.
  188.  
  189.    Free for non-commercial use. Use in commercial software subjected to prior acknowledgement and licensing from the author, reachable at the following network addresses:
  190.  
  191. AppleLink: RINALDI1   CalvaCom : FR10    Compuserve : 71170,2111
  192.                Internet : RINALDI1@APPLELINK.APPLE.COM